<template>
  <div class="service_page">
    <Menus :title="name" />
    <div class="list-icon">
      <ul>
        <li v-for="(item,index) in list" :key="'key-service-list-'+index">
          <router-link :to="item.link"><img :src="'static/img/icon/diagram/'+item.icon" alt="">
            <p>{{item.title}}</p>
          </router-link>
        </li>
        </li>
      </ul>
    </div>
  </div>
</template>
<script>
import Menus from '../components/Menu'
import service from '../datas/service'
import typename from '../datas/typename'
export default {
  data() {
    return {
      list: [],
      name: '',
      extra: 0
    }
  },
  mounted() {
    const { name } = this.$route.params
    this.list = service[name]
    this.name = typename[name]
    if (!localStorage.servicePoit) return
    const servicePosition = JSON.parse(localStorage.servicePoit)
    this.extra = servicePosition.extra
  },
  components: {
    Menus
  }
}
</script>
<style lang="scss">
.service_page {
  padding-top: 160px;
  min-height: 100vh;
  background: #fff;
}
</style>
